<%@ Control Language="C#" AutoEventWireup="true" CodeFile="newmessage.ascx.cs" Inherits="forums_controls_usercp_pm_newmessage" %>
<%@ Register Src="../../../../controls/misc/FCKEditor.ascx" TagName="FCKEditor" TagPrefix="uc2" %>
<%@ Register Src="../../posts/PreviewPost.ascx" TagName="PreviewPost" TagPrefix="uc1" %>
<asp:MultiView ID="mviewMsg" runat="server">
    <asp:View ID="viewMsg" runat="server">
        <table width="100%" border="0">
            <tr>
                <td width="75%" align="left" valign="top">
                    <asp:Panel runat="server" ID="pnlNewMessage" Width="100%">
                        <h3>New Private Message</h3>
                        <uc1:PreviewPost ID="PreviewPost1" runat="server" />
                        <p>
                            To: <asp:TextBox runat="server" ID="txtTo" Width="309px" ValidationGroup="NewMessage" MaxLength="25" />
                            <asp:RequiredFieldValidator ID="reqFieldTo" runat="server" ControlToValidate="txtTo"
                                ErrorMessage="Need a recipient." ValidationGroup="NewMessage" Display="None"></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtTo"
                                Display="None" EnableClientScript="False" ErrorMessage="User doesn't exist."
                                OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="NewMessage"></asp:CustomValidator></p>
                        <p>
                            Subject: <asp:TextBox runat="server" ID="txtSubject" Width="280px" ValidationGroup="NewMessage" MaxLength="255" />
                            <asp:RequiredFieldValidator ID="reqFieldSubject" runat="server" ErrorMessage="Need a subject." ControlToValidate="txtSubject" Display="None" ValidationGroup="NewMessage"></asp:RequiredFieldValidator></p>
                        <p>
                            Message:<br />
                            <uc2:FCKEditor ID="txtMessage" runat="server"
                                Width="700px"
                                Height="500px"/>
                        </p>
                        <p>
                            <asp:Button runat="server" ID="btnSend"
                                Text="Send" ValidationGroup="NewMessage" OnClick="btnSend_Click" />
                            <asp:Button ID="btnPreview" runat="server" OnClick="btnPreview_Click" Text="Preview" /></p>
                    </asp:Panel>
                </td>
                <td width="25%" align="left" valign="top">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="NewMessage" />
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="viewError" runat="server">
        Oops.</asp:View>
</asp:MultiView>
